<div id="Creating-a-repository"></div>
<div class="header">
<p>
Next: [[cvs: Backing up a repository#Backing up a repository|Backing up]], Previous: [[cvs: Multiple repositories#Multiple repositories|Multiple repositories]], Up: [[cvs: The Repository#The Repository|Repository]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Creating-a-repository-1"></div>
=== Creating a repository ===

<div id="index-Repository_002c-setting-up"></div>
<div id="index-Creating-a-repository"></div>
<div id="index-Setting-up-a-repository"></div>

To set up a <small>CVS</small> repository, first choose the
machine and disk on which you want to store the
revision history of the source files.  CPU and memory
requirements are modest, so most machines should be
adequate.  For details see [[cvs: Server requirements#Server requirements|Server requirements]].

To estimate disk space
requirements, if you are importing RCS files from
another system, the size of those files is the
approximate initial size of your repository, or if you
are starting without any version history, a rule of
thumb is to allow for the server approximately three
times the size of the code to be under <small>CVS</small> for the
repository (you will eventually outgrow this, but not
for a while).  On the machines on which the developers
will be working, you&rsquo;ll want disk space for
approximately one working directory for each developer
(either the entire tree or a portion of it, depending
on what each developer uses).

The repository should be accessible
(directly or via a networked file system) from all
machines which want to use <small>CVS</small> in server or local
mode; the client machines need not have any access to
it other than via the <small>CVS</small> protocol.  It is not
possible to use <small>CVS</small> to read from a repository
which one only has read access to; <small>CVS</small> needs to be
able to create lock files (see [[cvs: Several developers simultaneously attempting to run CVS#Several developers simultaneously attempting to run CVS|Concurrency]]).

<div id="index-init-_0028subcommand_0029"></div>
To create a repository, run the <code>cvs init</code>
command.  It will set up an empty repository in the
<small>CVS</small> root specified in the usual way
(see [[cvs: The Repository#The Repository|Repository]]).  For example,

<div class="example" style="margin-left: 3.2em">
 cvs -d /usr/local/cvsroot init
</div>

<code>cvs init</code> is careful to never overwrite any
existing files in the repository, so no harm is done if
you run <code>cvs init</code> on an already set-up
repository.

<code>cvs init</code> will enable history logging; if you
don&rsquo;t want that, remove the history file after running
<code>cvs init</code>.  See [[cvs: The history file#The history file|history file]].


----

<div class="header">
<p>
Next: [[cvs: Backing up a repository#Backing up a repository|Backing up]], Previous: [[cvs: Multiple repositories#Multiple repositories|Multiple repositories]], Up: [[cvs: The Repository#The Repository|Repository]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
